package com.sky;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@Slf4j
@EnableCaching                  // springcache缓存总开关
@SpringBootApplication
@EnableScheduling               // 开启任务调度总开关
@EnableTransactionManagement    //开启注解方式的事务管理
@MapperScan("com.sky.mapper")   // 一劳永逸。扫描mapper并装配进容器
@ComponentScan({"com.aliyun.oss","com.sky"}) // 组件扫描，添加aliOss起步依赖相关jar包
public class SkyApplication {
    public static void main(String[] args) {
        SpringApplication.run(SkyApplication.class, args);
        log.info("server started");
    }
}
